package com.earth.utils.exception;

import com.earth.utils.api.IErrorCode;

public class ServerException extends RuntimeException{

    private IErrorCode errorCode;

    public ServerException(IErrorCode errorCode) {
        super(errorCode.getMessage());
        this.errorCode = errorCode;
    }

    public ServerException(String message) {
        super(message);
    }

    public ServerException(Throwable cause) {
        super(cause);
    }

    public ServerException(String message, Throwable cause) {
        super(message, cause);
    }

    public IErrorCode getErrorCode() {
        return errorCode;
    }

}
